#ifndef ID_MANAGER_H_INCLUDED
#define ID_MANAGER_H_INCLUDED

#include "Mutex_Wrapper.h"
#include "Debug.h"

using namespace std;

class ID_Manager
{
    string m_strNewId;
    Mutex_Wrapper m_mutex;

    protected:
    static ID_Manager *instance;

    public:
    ID_Manager();
    string &get_ID();
    static ID_Manager &get_instance();
    static void destroy();
    void reset();
};

inline ID_Manager &ID_Manager::get_instance() {
    if(!instance) {
        instance = new ID_Manager();
    }
    return *instance;
}

inline void ID_Manager::reset()
{
    m_strNewId = "AAAAAAAA";
}
#endif // ID_MANAGER_H_INCLUDED
